package com.shenmazong.lambda;

/**
 * @program: server-java-demo
 * @description: DefaultInterfaceMethod
 * @author: 亮子说编程
 * @create: 2020-10-19 15:29
 **/

interface A {
    default void hello() {
        System.out.println("hello from A");
    }
}

interface B extends A {
    @Override
    default void hello() {
        System.out.println("hello from B");
    }
}

public class DefaultInterfaceMethod  implements A, B{

    public static void main(String[] args) {
        new DefaultInterfaceMethod().hello();
    }
}
